var GameData = require('../module/GameData')();
cc.Class({
    extends: cc.Component,

    properties: {},

    // LIFE-CYCLE CALLBACKS:

    onLoad() {

    },

    selectBtn(evt) {
        let _name = evt.currentTarget.name;
        switch (_name) {
            case "headbtn":
                var fun = function () {
                    cc.director.loadScene("player_Info");
                };
                GameData.gameStart.hide(fun);
                break;
            case "shop":
                var fun = function () {
                    cc.director.loadScene("shop");
                };
                GameData.gameStart.hide(fun);
                break;
            case "rank":

                var fun = function () {
                    cc.director.loadScene("rank");
                };
                GameData.gameStart.hide(fun);
                break;
            case "store":

                var fun = function () {
                    cc.director.loadScene("store");
                };
                GameData.gameStart.hide(fun);
                break;
            case "achieve":

                var fun = function () {
                    cc.director.loadScene("achieve");
                };
                GameData.gameStart.hide(fun);
                break;
            case "mail":
                GameData.gameStart.mail_layer.active = true;
                break;

            case "setting":
                break;

            case "match":
                // cc.director.loadScene("mulu");

                break;
            case "play":
                var fun = function () {
                    cc.director.loadScene("mulu");
                };
                GameData.gameStart.hide(fun);


                break;

        }

    },

    start() {

    },

    // update (dt) {},
});
